<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>添加商品</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <link href="<?php echo (C("backcss_path")); ?>/mine.css" type="text/css" rel="stylesheet">
        <script type="text/javascript" charset="utf-8" src="<?php echo (C("Plugin")); ?>/ue/ueditor.config.js"></script>
        <script type="text/javascript" charset="utf-8" src="<?php echo (C("Plugin")); ?>/ue/ueditor.all.min.js"> </script>
        <script type="text/javascript" charset="utf-8" src="<?php echo (C("Plugin")); ?>/ue/lang/zh-cn/zh-cn.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    </head>
    <style>
        #tabbar-div {
            background: #e6f6ff;
            padding-left: 10px;
            height: 22px;
            padding-top: 1px;
        }

        #tabbar-div p {
            margin: 2px 0 0 0;
        }
        #toggleImg{
            margin-top:8px;
        }
        .tab-front {
            line-height: 20px;
            font-weight: bold;
            padding: 4px 15px 4px 18px;
            cursor: pointer;
        }

        .tab-back {
            color: #3a3a3a;
            line-height: 20px;
            padding: 4px 15px 4px 18px;
            border-right: 1px solid #FFF;
            cursor: pointer;
        }

        .tab-hover {
            color: #FFF;
            background: #94C9D3;
            line-height: 20px;
            padding: 4px 15px 4px 18px;
            border-right: 1px solid #FFF;
            cursor: pointer;
        }

        #tabbody-div {
            border: 2px solid #BBDDE5;
            padding: 10px;
            background: #FFF;
        }

        #tabbody-div img {
            vertical-align: middle;
        }

        .tab-body {
            border: 0px solid #BBDDE5;
            padding: 10px;
        }
    </style>
    <script>
        $(function () {
            $("#tabbar-div span").click(function () {
                $("#tabbar-div span").attr("class","tab-back");
                $(this).attr("class","tab-front");
                $(".table_a").hide();
                var idflag = $(this).attr("id");
                $("#" + idflag + "-tb").show();
            })
        });
        function addImg() {
            var content = "<tr> " +
                "<td><a href='javascript:;' onclick='$(this).parent().remove()'>" +
                "[-]</a>上传文件 " +
                "<input type='file' name='img_url[]' /></td></tr>";

            $("#gallery-tab-tb").append(content);
        }
    </script>
    <body>
        <div class="div_head">
            <span>
                <span style="float:left">当前位置是：商品管理-》添加商品信息</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="<?php echo U('Goods/showlist');?>">【返回】</a>
                </span>
            </span>
        </div>
        <div></div>

        <div id="tabbar-div">
            <p>
                <span class="tab-front" id="general-tab">通用信息</span>
                <span class="tab-back" id="detail-tab">详细描述</span>
                <span class="tab-back" id="mix-tab">其他信息</span>
                <span class="tab-back" id="properties-tab">商品属性</span>
                <span class="tab-back" id="gallery-tab">商品相册</span>
                <span class="tab-back" id="linkgoods-tab">关联商品</span>
                <span class="tab-back" id="groupgoods-tab">配件</span>
                <span class="tab-back" id="article-tab">关联文章</span>
            </p>
        </div>


        <div style="font-size: 13px;margin: 10px 5px">
            <form action="" method="post" enctype="multipart/form-data">
            <table border="1" width="100%" class="table_a" id="general-tab-tb">
                <tr>
                    <td>商品名称</td>
                    <td><input type="text" name="goods_name" /></td>
                </tr>

                <tr>
                    <td>商品价格</td>
                    <td><input type="text" name="goods_price" /></td>
                </tr>

                <tr>
                    <td>商品重量</td>
                    <td><input type="text" name="goods_weight" /></td>
                </tr>

                <tr>
                    <td>商品大图</td>
                    <td><input type="file" name="goods_big_logo" /></td>
                </tr>



            </table>

                <table border="1" width="100%" class="table_a" id="gallery-tab-tb" style="display:none;">
                    <tr>

                        <td><a href='javascript:;' onclick="addImg()">[+]</a>上传文件<input type='file' name='img_url[]' /></td>
                    </tr>
                </table>

                <table border="1" width="100%" class="table_a" id="detail-tab-tb" style="display:none;">
                    <tr>
                        <td>商品详细描述</td>
                        <td>
                            <script name="goods_introduce" id="editor" type="text/plain" style="width:700px;height:250px;"></script>
                        </td>
                    </tr>
                </table>

                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="提交">
                    </td>
                </tr>
            </form>
        </div>



    <script type="text/javascript">
        var ue = UE.getEditor('editor');
    </script>
    </body>
</html>